feat: Added callback group events executor#3097
feat: Added callback group events executor#3097jmachowinski wants to merge 13 commits intoros2:rollingfrom
Conversation
273c322 to
66467b3
Compare
rclcpp/include/rclcpp/executors/events_cbg_executor/events_cbg_executor.hpp
Show resolved
Hide resolved
rclcpp/include/rclcpp/executors/events_cbg_executor/events_cbg_executor.hpp
Show resolved
Hide resolved
rclcpp/include/rclcpp/experimental/executors/events_cbg_executor/events_cbg_executor.hpp
Outdated
Show resolved
Hide resolved
rclcpp/include/rclcpp/experimental/executors/events_cbg_executor/events_cbg_executor.hpp
Outdated
Show resolved
Hide resolved
rclcpp/include/rclcpp/executors/events_cbg_executor/events_cbg_executor.hpp
Outdated
Show resolved
Hide resolved
rclcpp/src/rclcpp/executors/events_cbg_executor/events_cbg_executor.cpp
Outdated
Show resolved
Hide resolved
rclcpp/src/rclcpp/experimental/executors/events_cbg_executor/events_cbg_executor.cpp
Outdated
Show resolved
Hide resolved
|
@jmachowinski can you add this to the executor unit-tests? |
f7b3021 to
7eb2fca
Compare
This commit adds the callback group events executor. It features: - multithreading support - correct handling of sim time - usage of the events subsystem Signed-off-by: Janosch Machowinski <[email protected]>
Signed-off-by: Janosch Machowinski <[email protected]>
Signed-off-by: Janosch Machowinski <[email protected]>
Signed-off-by: Janosch Machowinski <[email protected]>
Signed-off-by: Janosch Machowinski <[email protected]>
4933042 to
26fd9db
Compare
Signed-off-by: Janosch Machowinski <[email protected]>
…ager This code was copied straight from the executor and seems to be a workaround for the multithreaded executor, that breaks in this use case. The correct solution for us is to do the timer->call() from within the worker thread. This fixes a deadlock due to double acquisition of an internal lock within the timer manager. Signed-off-by: Janosch Machowinski <[email protected]>
In case the next timer wakeup time is not changed by an insertion of a timer, don't wake up the timer thread. Signed-off-by: Janosch Machowinski <[email protected]>
26fd9db to
430c2dd
Compare
|
Pulls: #3097 |
Signed-off-by: Janosch Machowinski <[email protected]>
Signed-off-by: Janosch Machowinski <[email protected]>
skyegalaxy
left a comment
There was a problem hiding this comment.
Aside from some spelling nits and a handful of small implementation questions, this is looking great! Very excited to get this over the finish line soon.
rclcpp/include/rclcpp/executors/events_cbg_executor/events_cbg_executor.hpp
Outdated
Show resolved
Hide resolved
| added_nodes_cpy = added_nodes; | ||
| } | ||
|
|
||
| // *3 is a rough estimate of how many callback_group a node may have |
There was a problem hiding this comment.
What would happen in the case where a node might have more than 3 callback groups?
There was a problem hiding this comment.
you get slight runtime overhead, as the vector needs to be resized.
| } | ||
| } | ||
|
|
||
| // FIXME inform scheduler about remove cbgs |
There was a problem hiding this comment.
what are the side-effects of leaving this as is and not informing the scheduler here?
rclcpp/src/rclcpp/executors/events_cbg_executor/events_cbg_executor.cpp
Outdated
Show resolved
Hide resolved
rclcpp/src/rclcpp/executors/events_cbg_executor/events_cbg_executor.cpp
Outdated
Show resolved
Hide resolved
| * This is needed, as clocks may be deleted during normal operation, | ||
| * and be don't have a way to create a permanent ros time clock. | ||
| */ | ||
| class ClockConditionalVariable |
There was a problem hiding this comment.
I think it could be worth eventually merging the functionality of this ClockConditionalVariable variant with the existing one and cutting down on the duplicate code if it's not too complex to do.
rclcpp/src/rclcpp/executors/events_cbg_executor/timer_manager.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Janosch Machowinski <[email protected]>
Signed-off-by: Janosch Machowinski <[email protected]>
yes, that is the idea. |
This commit adds the callback group events executor. It features:
Description
This moved the events cbg executor from cm_executors into rlcpp mainline.
Did you use Generative AI?
No